package com.fightingFish.user.bean;

import java.util.List;

public class GetUser<Q>  {
    private int pageSize ;// 每页条数
    private List<Q> qList;//每页的内容
    private int pageNo;//当前页码
    private int pageNum;//总页数
    private int pageCount;//总记录条数

    public GetUser() {

    }

    public int getPageSize() {
        this.pageSize=this.pageCount;
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<Q> getqList() {
        return qList;
    }

    public void setqList(List<Q> qList) {
        this.qList = qList;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        if(pageNo>this.getPageNum()){
            this.pageNo=this.getPageNum();
        }
        if (pageNo<1){
            this.pageNo=1;
        }
        else {
            this.pageNo=pageNo;
        }

    }

    public int getPageNum() {
        if (pageCount%pageSize!=0){
            return pageCount/pageSize+1;
        }
        return pageCount/pageSize;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }
}
